package 杨辉三角;

import java.util.Scanner;

public class Main {
    static int N = 40;
    static int[][] f = new int[N][N];

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        for (int i = 1; i <= n; i++) {
            f[i][1] = f[i][i] = 1;
        }
        for (int i = 3; i <= n; i++) {
            for (int j = 2; j <= i - 1; j++) {
                f[i][j] = f[i - 1][j - 1] + f[i - 1][j];
            }
        }
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.printf("%d\5t",f[i][j]);
            }
            System.out.println();
        }
    }
}
